package com.hyt.it.ogt.kq.service.gov.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hyt.core.base.BaseServiceImpl;
import com.hyt.it.ogt.kq.service.gov.mapper.TaskRoomTestReportDetailMapper;
import com.hyt.it.ogt.kq.service.gov.model.entity.TaskRoomTestReportDetail;
import com.hyt.it.ogt.kq.service.gov.service.ITaskRoomTestReportDetailService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 考场测试报告详情表 服务实现类
 * </p>
 *
 * @author huangyh
 * @since 2021-08-13
 */
@Service
public class TaskRoomTestReportDetailServiceImpl extends BaseServiceImpl<TaskRoomTestReportDetailMapper, TaskRoomTestReportDetail> implements ITaskRoomTestReportDetailService {

    @Override
    public TaskRoomTestReportDetail getByReportId(String reportId) {
        QueryWrapper<TaskRoomTestReportDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda()
                .eq(TaskRoomTestReportDetail::getTestReportId, reportId)
                .eq(TaskRoomTestReportDetail::getDelFlag, false)
                .last("LIMIT 1");
        return getOne(queryWrapper);
    }

}
